//
// Created by 67678 on 2023/3/10.
//

#include <thread>
#include <iostream>
#include <functional>
#include "socketServer.h"
#include "socketClient.h"
#include "epoll.h"

using namespace std;

using namespace socket_epoll;


void socketServerThread() {
    Epoll &epoll = Epoll::getInstance();
    epoll.init();
    SocketServer &socketServer = SocketServer::getInstance();
    socketServer.init();
    for (auto event: socketServer.getEvents()) {
        cout << event->type.type.major << "  " << event->type.type.minor << endl;
    }
}

void testConnection() {
    jthread t(socketServerThread);

    SocketClient sc;

}


int main() {
    testConnection();
}